﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using posttracker;
using NUnit.Framework;
//using System.Web.Security;
namespace TestLib
{
    [TestFixture]
    public class TestTrackerRegistration
    {
        [Test]
        public void TestUpdateUser()
        {
            //posttracker.Classes.User user = new posttracker.Classes.User() { Id = 1, UserName = "Jam", Password = "1234", RoleId = 1, Email = "Jam@tut.by" };

            //Assert.Throws(typeof(HttpRequestException), posttracker.Classes.Registration.Update(user));

            //Assert.That(posttracker.Classes.Registration.Update(user), Throws.HttpRequestException);

            Assert.DoesNotThrow(() => { posttracker.Classes.Registration.Update(new { Id = 1, UserName = "Jam", Password = "1234", RoleId = 1, Email = "Jam@tut.by" }); }); 
            //Assert.That(posttracker.Classes.Registration.Update(user), Throws.HttpRequestException);
            
        }
    }
}
